package edu.nf.llmtest.web;

import edu.nf.llmtest.common.VO.ResultVO;
import edu.nf.llmtest.common.base.BaseController;
import edu.nf.llmtest.model.entity.Session;
import edu.nf.llmtest.service.SessionService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ Author bin
 * @ Create  2025/11/3 上午10:37
 **/
@RestController
@RequiredArgsConstructor
@RequestMapping("/llm")
public class SessionController extends BaseController {
    private final SessionService sessionService;
    @GetMapping("/getSession")
    public ResultVO<List<Session>> getSession(@RequestParam("userId") Integer userId) {
        return success(sessionService.getSessionByUserId(userId));
    }
}
